home *** CD-ROM | disk | FTP | other *** search
- Path: airdmhor.gen.nz!not-for-mail
- From: gumboot@airdmhor.gen.nz (Simon Hosie)
- Newsgroups: comp.lang.c
- Subject: Re: "Best fit" algorithm (help)
- Date: 1 Apr 1996 17:40:13 +1200
- Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
- Message-ID: <4jnq7t$643@airdmhor.gen.nz>
- References: <APC&7'0'22b6b83'874@peg.apc.org> <4jhlu7$5m2@airdmhor.gen.nz> <4ji4b1$jc5@news1.mnsinc.com>
- NNTP-Posting-Host: airdmhor.gen.nz
- X-Newsreader: TIN [version 1.2 PL2]
-
- riox@peg.apc.org:
- > I am looking for a "best fit" algorithm.
- > The problem I have is very similar to finding the best way of fitting the
- > maximum number of songs on (say) 45 minute tape.
-
- Simon Hosie (gumboot@airdmhor.gen.nz) wrote:
- > I used to have a program like that for my C64, the guy that wrote it said
- > the most effective method he found was trying random combinations.
-
- Szu-Wen Huang:
- > The solution to the knapsack problem is to randomly allocate?! I'm
- > fairly sure my algorithm teacher doesn't know this yet. Care to show
- > some numbers? *Chuckle*
-
- He said it was faster than brute force. I couldn't be bothered writing my
- own so I just accepted it. It's got me curious, now, I think I might have a
- go at it.
-